package com.xiashitech.agent.service.facade;

import com.xiashitech.agent.config.StartConfig;
import com.xiashitech.agent.utils.HttpUtil;
import com.xiashitech.interfaces.agent.constants.AgentStatus;

import java.util.function.Consumer;

/**
 * agent客户端的http实现
 */
class HttpClient implements XSClient {

    private String agentService;

    public void setAgentService(String agentService) {
        this.agentService = agentService;
    }

    @Override
    public String syncConfig(Consumer<String> respHandler) {
        // return HttpUtil.doPost(agentService + StartConfig.serverContextPath + "/v1/agent/syncConfig");
        return HttpUtil.doPost(StartConfig.getAgentServiceRoot() + "/v1/agent/syncConfig");
    }

    @Override
    public String getSystemInfo(Consumer<String> respHandler) {
        return null;
    }

    @Override
    public String syncAgentStatus(AgentStatus agentStatus, Consumer<String> respHandler) {
        return null;
    }

    @Override
    public String syncAgentHost(String host, Consumer<String> respHandler) {
        return null;
    }

    @Override
    public String updateCacheStatus(Consumer<String> respHandler) {
        return null;
    }


}
